package T6;

public class Student {
    int s_No;
    String s_Name;
    char s_Sex;
    int s_Age;

    public Student(int s_No, String s_Name, char sex, int s_Age) {
        this.s_No = s_No;
        this.s_Name = s_Name;
        this.s_Sex = s_Sex;
        this.s_Age = s_Age;
    }
    public int showNo(){
        return s_No;
    }
    public String showName(){
        return s_Name;
    }
    public char showSex(){
        return s_Sex;
    }
    public int showAge(){
        return s_Age;
    }

    public void setS_No(int s_No) {
        this.s_No = s_No;
    }
    public void modifyAge(int s_Age){
        this.s_Age=s_Age;
    }
public static void main(String[] args){
        Student s1=new Student(123,"张三",'男',19);
    System.out.print(s1.showNo()+" ");
    System.out.print(s1.showName()+" ");
    System.out.print(s1.showSex()+" ");
    System.out.println(s1.showAge());

    Student s2=new Student(123,"张三",'男',19);
    System.out.print(s2.showNo()+" ");
    System.out.print(s2.showName()+" ");
    System.out.print(s2.showSex()+" ");
    System.out.print(s2.showAge()+" ");

    s1.modifyAge(22);
    System.out.println(s1.showAge());;
}
}

